
#include <SDL.h>

#include "engine/st-common.h"
#include "engine/st-graphic.h"

SDL_Event       event;
Uint8           done=0;

void load_resources(void);
void unload_resources(void);
void process_key(SDL_keysym *sym, int pressed);

int main(void)
{
    if (st_graphic_InitScreen(800,600,0) == ST_ERROR)
    {
        return -1;
    }

    load_resources();

    while(done == 0)
    {
        while ( SDL_PollEvent(&event))
        {
            switch (event.type) 
            {
                case SDL_KEYDOWN:
                    process_key(&event.key.keysym, event.key.state);
                    break;
                case SDL_KEYUP:
                    break;
                case SDL_MOUSEBUTTONDOWN:
                    /* Any button press quits the app... */
                case SDL_QUIT:
                    done = 1;
                    break;
                default:
                    break;
            }
        }

        st_graphic_UpdateScreen(NULL, 0);
    }

    unload_resources();

    return 0;
}

void load_resources(void)
{}
void unload_resources(void)
{}
void process_key(SDL_keysym *sym, int pressed)
{}
